import axios from 'axios';


let JHserver = 'http://120.131.3.218:8080';
let server = 'http://localhost:8080';
let dataServer = 'http://120.92.15.43:10086';

//export const requestLogin = params => { return axios.post(`/loginData`, { params: params }); };

export const ServerTestConstant = () => { return axios.get(`${JHserver}/oa`); };

//arpuList
export const getArpuList = (params,set) => {
  return axios.get(set.httphost+`/schedule/oa/arpuList.html`, { params: params });
};
//添加kpi设定
export const setApi = (param) => { return axios.post(`${dataServer}/kpi/kpi`,param); };
//修改kpi设定
export const updateApi = (param) => { return axios.put(`${dataServer}/kpi/kpi`,param); };
//删除kpi设定
export const delApi = (param) => { return axios.delete(`${dataServer}/kpi/kpi`,{ params: param }); };
//获取kpi列表
export const getApi = (param) => { return axios.get(`${dataServer}/kpi/kpi`,{ params: param }); };
//当日流水数据总览
export const getArpuCount = (set) => { return axios.get(set.httphost+`/schedule/oa/arpuCount.html`); };
//当日24小时流水数据总览
export const getHourCount = (set) => { return axios.get(set.httphost+`/schedule/oa/arpuHour.html`); };
//留存数据
 export const getRemainList = (params,set) => { return axios.get(set.httphost+`/schedule/oa/remain.html`, { params: params }); };
//LTV数据
export const getltvList = (params,set) => { return axios.get(set.httphost+`/schedule/oa/LTVList.html`, { params: params }); };
//channelList数据
export const getChannelList = set => { return axios.get(set.httphost+`/schedule/oa/channelList.html`); };
//所有游戏总览
export const getGameList = params => { return axios.get(`${JHserver}/schedule/oa/serverConfig.html`, { params: params }); };
//登录
export const login = params => { return axios.post(`${dataServer}/user/login`, params); };
//退出
export const logout = params => { return axios.post(`${dataServer}/user/logout`, params); };
//退出
export const updatePwd = params => { return axios.put(`${dataServer}/user/updatePwd`, params); };
//获取盐
export const getSolt = params => { return axios.post(`${dataServer}/user/loginSolt`, params); };


